home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / xsltproc < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.2 KB  |  57 lines

  1. # xsltproc(1) completion
  2.  
  3. have xsltproc &&
  4. _xsltproc()
  5. {
  6.     local cur prev
  7.     COMPREPLY=()
  8.     _get_comp_words_by_ref cur prev
  9.  
  10.     case $prev in
  11.     --output|-o)
  12.             _filedir
  13.             return 0
  14.             ;;
  15.         # TODO : number only
  16.         --maxdepth)
  17.             return 0
  18.             ;;
  19.         --encoding)
  20.             # some aliases removed
  21.             COMPREPLY=( $( compgen -W "$( iconv -l | sed -e '/^UTF[1378]/d' \
  22.                 -e '/^ISO[0-9_]/d' -e '/^8859/d' -e 's/\/.*//')" -- "$cur" ) )
  23.             return 0
  24.             ;;
  25.         --param|--stringparam)
  26.             return 0
  27.             ;;
  28.         # not really like --writesubtree
  29.         --path)
  30.             _filedir -d
  31.             return 0
  32.             ;;
  33.         --writesubtree)
  34.             _filedir -d
  35.             return 0
  36.             ;;
  37.     esac
  38.  
  39.     [[ $COMP_CWORD -gt 2 && `_get_cword '' 2` == --?(string)param ]] && \
  40.         return 0
  41.  
  42.     if [[ "$cur" == -* ]]; then
  43.         _longopt xsltproc
  44.     else
  45.     _filedir '@(xsl|xslt|xml)'
  46.     fi
  47. } &&
  48. complete -F _xsltproc -o filenames xsltproc
  49.  
  50. # Local variables:
  51. # mode: shell-script
  52. # sh-basic-offset: 4
  53. # sh-indent-comment: t
  54. # indent-tabs-mode: nil
  55. # End:
  56. # ex: ts=4 sw=4 et filetype=sh
  57.